The present invention relates in general to data processing, and in particular to predicated launching of threads in a processor.
In computer programming, a predicate is generally defined as an operator or function which returns a Boolean value, true or false. Predication is a choice to execute (or not to execute) a given instruction based on the content of a memory location such as a machine register. Some applications can be optimized by loading launch commands for several program threads but then selectively launching the program threads depending on a predicate.
For example, in some applications it is desirable for launching of a second program thread to be predicated by a result of a first program thread. The second program thread may provide extra processing that may or may not be needed, depending on the results generated by the first program thread. Predication allows launch commands for the second program thread to be loaded, but if the extra processing is not needed, the launch commands for the second program thread may be ignored so that the second program thread does not launch.